package cn.chenli.job.service;

import cc.tuhaolicai.mt.predefined.database.PageInfo;
import org.asyou.mongo.Page;

import java.util.List;

/**
 * BaseDao
 *
 * @author chenli
 * @create 2017-06-13
 **/
public interface BaseService<T> {
    T save(T t);

    T findOne(T t);

    Page<T> findPage(T t, PageInfo pageInfo);

    List<T> findAll(T t);

    Boolean update(T oldModel, T newModel);

    Boolean delete(T t);

    /**
     * 切换数据
     *
     * @param list:数据
     */
    List<T> convert(List<T> list);

}
